// 判断是否为移动端
export const isMobile = () => {
  const userAgentInfo = navigator.userAgent
  const Agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
  let flag = false
  for (const v of Agents) {
    if (userAgentInfo.indexOf(v) > 0) {
      flag = true
      break
    }
  }
  return flag
}

